Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Selection Input] Refactor auto-complete system. #27389

Merged
merged 33 commits into from
Feb 3, 2025

Conversation

salazarm
Copy link
Contributor

@salazarm salazarm commented Jan 25, 2025

Summary & Motivation

The primary goal of this refactor is to decouple the auto-complete suggestion UI from the autocomplete visitor logic.

Before:

  • Visitor hard coded the types of the suggestions
  • UI rendering was tightly coupled to those types
  • The types were too restrictive, they required all of the values to be strings but that doesn't work well for tags which have a key and a value. Encoding the tags as a string (eg: "key"="value") created ambiguities, where we could not tell if the string was a tag of {key: "key", value: "value"} or a tag of {key: "key"="value", value: undefined}.

After:

  • Rendering is encapsulated in the SelectionAutoCompleteProvider which is also responsible for making auto-complete suggestions and can handle both string and tag object types.

How I Tested These Changes

Existing jest test in SelectionAutocomplete.ts. + Manual testing in cloud and OSS.

Copy link

github-actions bot commented Jan 25, 2025

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-mco4dw46a-elementl.vercel.app
https://salazarm-refactor-auto-complete-logic.core-storybook.dagster-docs.io

Built with commit d889556.
This pull request is being automatically deployed with vercel-action

@salazarm salazarm changed the base branch from master to salazarm/filter-out-kind-tags January 25, 2025 23:25
@salazarm salazarm marked this pull request as ready for review January 26, 2025 01:29
@salazarm salazarm force-pushed the salazarm/refactor-auto-complete-logic branch from 794d7e3 to b8b7551 Compare January 28, 2025 05:14
Copy link
Collaborator

@bengotow bengotow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Left a few inline comments and nits but overall it seems solid 💯

Base automatically changed from salazarm/filter-out-kind-tags to master February 3, 2025 12:32
@salazarm salazarm merged commit e800de1 into master Feb 3, 2025
5 of 6 checks passed
@salazarm salazarm deleted the salazarm/refactor-auto-complete-logic branch February 3, 2025 13:37
LoHertel pushed a commit to LoHertel/dagster that referenced this pull request Feb 11, 2025
## Summary & Motivation

The primary goal of this refactor is to decouple the auto-complete
suggestion UI from the autocomplete visitor logic.

Before:
- Visitor hard coded the types of the suggestions 
- UI rendering was tightly coupled to those types
- The types were too restrictive, they required all of the values to be
strings but that doesn't work well for tags which have a key and a
value. Encoding the tags as a string (eg: `"key"="value"`) created
ambiguities, where we could not tell if the string was a tag of `{key:
"key", value: "value"}` or a tag of `{key: "key"="value", value:
undefined}`.


After:
- Rendering is encapsulated in the SelectionAutoCompleteProvider which
is also responsible for making auto-complete suggestions and can handle
both string and tag object types.



## How I Tested These Changes

Existing jest test in SelectionAutocomplete.ts. + Manual testing in
cloud and OSS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants